<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加我的工作笔记页面</title>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>

</head>
<body>
<div id="section">
	<form action="${pageContext.request.contextPath }/working/workingaddsave" method="post">
		<table>
			<tr><th>我的工作笔记</th></tr>
			<tr>
				<td>标题：</td>
				<td><input type="text" id="title" name="title"/></td>
				<td></td>
			</tr>
			<tr>
				<td>内容：</td>
				<td><input type="text" id="content" name="content"/></td>
				<td></td>
			</tr>
			<tr>
				<td>类别</td>
				<td>
					<select id="status" name="status">
						<option value="0">请选择类别</option>
						<option value="1">技术</option>
						<option value="2">行政</option>
						<option value="3">人事</option>
					</select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td><input type="submit" value="提交" id="submit"/></td>
			</tr>
		</table>
	</form>
</div>
<script type="text/javascript">
	$(function(){
		$("#submit").click(function(){
			var title = $("#title").val();
			if(title == "" || title == null){
				alert("标题不能为空!");
				return false;
			}
			
			var content = $("#content").val();
			if(content == "" || content == null){
				alert("内容不能为空!");
				return false;
			}
			
			var status = $("#status").val();
			if(status == "0"){
				alert("请选择类别");
				return false;
			}
			
			return true;
		});
	});
</script>
</body>
</html>